using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VSYSTVM
    {
        public DataRow Convert2SYSTVM(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QuerySYSTVM(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["SYVMANDANT"] = " ".PadRight(2 ); 
         dwReturn["SYVTABNR"] = " ".PadRight(4 ); 
         dwReturn["SYVSPRKZ"] = " ".PadRight(1 ); 
         dwReturn["SYVVORGDT1"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT2"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT3"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT4"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT5"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT6"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT7"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT8"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT9"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT10"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT11"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT12"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT13"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT14"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT15"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT16"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT17"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT18"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT19"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT20"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT21"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT22"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT23"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT24"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT25"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT26"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT27"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT28"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT29"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT30"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT31"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT32"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT33"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT34"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT35"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT36"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT37"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT38"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT39"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGDT40"] = " ".PadRight(2 ); 
         dwReturn["SYVVORGFS1"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS1"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS2"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS2"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS3"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS3"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS4"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS4"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS5"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS5"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS6"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS6"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS7"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS7"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS8"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS8"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS9"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS9"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS10"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS10"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS11"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS11"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS12"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS12"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS13"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS13"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS14"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS14"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS15"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS15"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS16"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS16"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS17"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS17"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS18"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS18"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS19"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS19"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS20"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS20"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS21"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS21"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS22"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS22"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS23"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS23"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS24"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS24"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS25"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS25"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS26"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS26"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS27"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS27"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS28"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS28"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS29"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS29"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS30"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS30"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS31"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS31"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS32"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS32"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS33"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS33"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS34"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS34"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS35"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS35"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS36"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS36"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS37"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS37"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS38"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS38"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS39"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS39"] = " ".PadRight(30 ); 
         dwReturn["SYVVORGFS40"] = " ".PadRight(2 ); 
         dwReturn["SYVBEZFS40"] = " ".PadRight(30 ); 
         dwReturn["SYVBEMERK"] = " ".PadRight(50 ); 
         dwReturn["SYVFILLER"] = " ".PadRight(7 ); 
         dwReturn["SYVAEND"] = " ".PadRight(0 ); 
         dwReturn["SYVAENB"] = " ".PadRight(8 ); 
         dwReturn["SYVNEUD"] = " ".PadRight(0 ); 
         dwReturn["SYVNEUB"] = " ".PadRight(8 ); 
         dwReturn["SYVAENZL"] = " ".PadRight(0 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapSYSTVM(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveSYSTVM(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QuerySYSTVM(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapSYSTVM(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertSYSTVM(dwLocal, ITXDBVERSION);
            }
            UpdateSYSTVM(dwLocal);
        }
        public void InsertSYSTVM(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO SYSTVM(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QuerySYSTVM(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM SYSTVM WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM SYSTVM  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "SYSTVM";
            Return = Result;
            return Return;
        }
        public void DeleteSYSTVM(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM SYSTVM   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateSYSTVM(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE SYSTVM SET "
                    +"SYVMANDANT= :SYVMANDANT,"
                    +"SYVTABNR= :SYVTABNR,"
                    +"SYVSPRKZ= :SYVSPRKZ,"
                    +"SYVVORGDT1= :SYVVORGDT1,"
                    +"SYVVORGDT2= :SYVVORGDT2,"
                    +"SYVVORGDT3= :SYVVORGDT3,"
                    +"SYVVORGDT4= :SYVVORGDT4,"
                    +"SYVVORGDT5= :SYVVORGDT5,"
                    +"SYVVORGDT6= :SYVVORGDT6,"
                    +"SYVVORGDT7= :SYVVORGDT7,"
                    +"SYVVORGDT8= :SYVVORGDT8,"
                    +"SYVVORGDT9= :SYVVORGDT9,"
                    +"SYVVORGDT10= :SYVVORGDT10,"
                    +"SYVVORGDT11= :SYVVORGDT11,"
                    +"SYVVORGDT12= :SYVVORGDT12,"
                    +"SYVVORGDT13= :SYVVORGDT13,"
                    +"SYVVORGDT14= :SYVVORGDT14,"
                    +"SYVVORGDT15= :SYVVORGDT15,"
                    +"SYVVORGDT16= :SYVVORGDT16,"
                    +"SYVVORGDT17= :SYVVORGDT17,"
                    +"SYVVORGDT18= :SYVVORGDT18,"
                    +"SYVVORGDT19= :SYVVORGDT19,"
                    +"SYVVORGDT20= :SYVVORGDT20,"
                    +"SYVVORGDT21= :SYVVORGDT21,"
                    +"SYVVORGDT22= :SYVVORGDT22,"
                    +"SYVVORGDT23= :SYVVORGDT23,"
                    +"SYVVORGDT24= :SYVVORGDT24,"
                    +"SYVVORGDT25= :SYVVORGDT25,"
                    +"SYVVORGDT26= :SYVVORGDT26,"
                    +"SYVVORGDT27= :SYVVORGDT27,"
                    +"SYVVORGDT28= :SYVVORGDT28,"
                    +"SYVVORGDT29= :SYVVORGDT29,"
                    +"SYVVORGDT30= :SYVVORGDT30,"
                    +"SYVVORGDT31= :SYVVORGDT31,"
                    +"SYVVORGDT32= :SYVVORGDT32,"
                    +"SYVVORGDT33= :SYVVORGDT33,"
                    +"SYVVORGDT34= :SYVVORGDT34,"
                    +"SYVVORGDT35= :SYVVORGDT35,"
                    +"SYVVORGDT36= :SYVVORGDT36,"
                    +"SYVVORGDT37= :SYVVORGDT37,"
                    +"SYVVORGDT38= :SYVVORGDT38,"
                    +"SYVVORGDT39= :SYVVORGDT39,"
                    +"SYVVORGDT40= :SYVVORGDT40,"
                    +"SYVVORGFS1= :SYVVORGFS1,"
                    +"SYVBEZFS1= :SYVBEZFS1,"
                    +"SYVVORGFS2= :SYVVORGFS2,"
                    +"SYVBEZFS2= :SYVBEZFS2,"
                    +"SYVVORGFS3= :SYVVORGFS3,"
                    +"SYVBEZFS3= :SYVBEZFS3,"
                    +"SYVVORGFS4= :SYVVORGFS4,"
                    +"SYVBEZFS4= :SYVBEZFS4,"
                    +"SYVVORGFS5= :SYVVORGFS5,"
                    +"SYVBEZFS5= :SYVBEZFS5,"
                    +"SYVVORGFS6= :SYVVORGFS6,"
                    +"SYVBEZFS6= :SYVBEZFS6,"
                    +"SYVVORGFS7= :SYVVORGFS7,"
                    +"SYVBEZFS7= :SYVBEZFS7,"
                    +"SYVVORGFS8= :SYVVORGFS8,"
                    +"SYVBEZFS8= :SYVBEZFS8,"
                    +"SYVVORGFS9= :SYVVORGFS9,"
                    +"SYVBEZFS9= :SYVBEZFS9,"
                    +"SYVVORGFS10= :SYVVORGFS10,"
                    +"SYVBEZFS10= :SYVBEZFS10,"
                    +"SYVVORGFS11= :SYVVORGFS11,"
                    +"SYVBEZFS11= :SYVBEZFS11,"
                    +"SYVVORGFS12= :SYVVORGFS12,"
                    +"SYVBEZFS12= :SYVBEZFS12,"
                    +"SYVVORGFS13= :SYVVORGFS13,"
                    +"SYVBEZFS13= :SYVBEZFS13,"
                    +"SYVVORGFS14= :SYVVORGFS14,"
                    +"SYVBEZFS14= :SYVBEZFS14,"
                    +"SYVVORGFS15= :SYVVORGFS15,"
                    +"SYVBEZFS15= :SYVBEZFS15,"
                    +"SYVVORGFS16= :SYVVORGFS16,"
                    +"SYVBEZFS16= :SYVBEZFS16,"
                    +"SYVVORGFS17= :SYVVORGFS17,"
                    +"SYVBEZFS17= :SYVBEZFS17,"
                    +"SYVVORGFS18= :SYVVORGFS18,"
                    +"SYVBEZFS18= :SYVBEZFS18,"
                    +"SYVVORGFS19= :SYVVORGFS19,"
                    +"SYVBEZFS19= :SYVBEZFS19,"
                    +"SYVVORGFS20= :SYVVORGFS20,"
                    +"SYVBEZFS20= :SYVBEZFS20,"
                    +"SYVVORGFS21= :SYVVORGFS21,"
                    +"SYVBEZFS21= :SYVBEZFS21,"
                    +"SYVVORGFS22= :SYVVORGFS22,"
                    +"SYVBEZFS22= :SYVBEZFS22,"
                    +"SYVVORGFS23= :SYVVORGFS23,"
                    +"SYVBEZFS23= :SYVBEZFS23,"
                    +"SYVVORGFS24= :SYVVORGFS24,"
                    +"SYVBEZFS24= :SYVBEZFS24,"
                    +"SYVVORGFS25= :SYVVORGFS25,"
                    +"SYVBEZFS25= :SYVBEZFS25,"
                    +"SYVVORGFS26= :SYVVORGFS26,"
                    +"SYVBEZFS26= :SYVBEZFS26,"
                    +"SYVVORGFS27= :SYVVORGFS27,"
                    +"SYVBEZFS27= :SYVBEZFS27,"
                    +"SYVVORGFS28= :SYVVORGFS28,"
                    +"SYVBEZFS28= :SYVBEZFS28,"
                    +"SYVVORGFS29= :SYVVORGFS29,"
                    +"SYVBEZFS29= :SYVBEZFS29,"
                    +"SYVVORGFS30= :SYVVORGFS30,"
                    +"SYVBEZFS30= :SYVBEZFS30,"
                    +"SYVVORGFS31= :SYVVORGFS31,"
                    +"SYVBEZFS31= :SYVBEZFS31,"
                    +"SYVVORGFS32= :SYVVORGFS32,"
                    +"SYVBEZFS32= :SYVBEZFS32,"
                    +"SYVVORGFS33= :SYVVORGFS33,"
                    +"SYVBEZFS33= :SYVBEZFS33,"
                    +"SYVVORGFS34= :SYVVORGFS34,"
                    +"SYVBEZFS34= :SYVBEZFS34,"
                    +"SYVVORGFS35= :SYVVORGFS35,"
                    +"SYVBEZFS35= :SYVBEZFS35,"
                    +"SYVVORGFS36= :SYVVORGFS36,"
                    +"SYVBEZFS36= :SYVBEZFS36,"
                    +"SYVVORGFS37= :SYVVORGFS37,"
                    +"SYVBEZFS37= :SYVBEZFS37,"
                    +"SYVVORGFS38= :SYVVORGFS38,"
                    +"SYVBEZFS38= :SYVBEZFS38,"
                    +"SYVVORGFS39= :SYVVORGFS39,"
                    +"SYVBEZFS39= :SYVBEZFS39,"
                    +"SYVVORGFS40= :SYVVORGFS40,"
                    +"SYVBEZFS40= :SYVBEZFS40,"
                    +"SYVBEMERK= :SYVBEMERK,"
                    +"SYVFILLER= :SYVFILLER,"
                    +"SYVAEND= :SYVAEND,"
                    +"SYVAENB= :SYVAENB,"
                    +"SYVNEUD= :SYVNEUD,"
                    +"SYVNEUB= :SYVNEUB,"
                    +"SYVAENZL= :SYVAENZL,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("SYVMANDANT", OracleType.NVarChar).Value = dwData["SYVMANDANT"].ToString(); 
          or1.Parameters.Add("SYVTABNR", OracleType.NVarChar).Value = dwData["SYVTABNR"].ToString(); 
          or1.Parameters.Add("SYVSPRKZ", OracleType.NVarChar).Value = dwData["SYVSPRKZ"].ToString(); 
          or1.Parameters.Add("SYVVORGDT1", OracleType.NVarChar).Value = dwData["SYVVORGDT1"].ToString(); 
          or1.Parameters.Add("SYVVORGDT2", OracleType.NVarChar).Value = dwData["SYVVORGDT2"].ToString(); 
          or1.Parameters.Add("SYVVORGDT3", OracleType.NVarChar).Value = dwData["SYVVORGDT3"].ToString(); 
          or1.Parameters.Add("SYVVORGDT4", OracleType.NVarChar).Value = dwData["SYVVORGDT4"].ToString(); 
          or1.Parameters.Add("SYVVORGDT5", OracleType.NVarChar).Value = dwData["SYVVORGDT5"].ToString(); 
          or1.Parameters.Add("SYVVORGDT6", OracleType.NVarChar).Value = dwData["SYVVORGDT6"].ToString(); 
          or1.Parameters.Add("SYVVORGDT7", OracleType.NVarChar).Value = dwData["SYVVORGDT7"].ToString(); 
          or1.Parameters.Add("SYVVORGDT8", OracleType.NVarChar).Value = dwData["SYVVORGDT8"].ToString(); 
          or1.Parameters.Add("SYVVORGDT9", OracleType.NVarChar).Value = dwData["SYVVORGDT9"].ToString(); 
          or1.Parameters.Add("SYVVORGDT10", OracleType.NVarChar).Value = dwData["SYVVORGDT10"].ToString(); 
          or1.Parameters.Add("SYVVORGDT11", OracleType.NVarChar).Value = dwData["SYVVORGDT11"].ToString(); 
          or1.Parameters.Add("SYVVORGDT12", OracleType.NVarChar).Value = dwData["SYVVORGDT12"].ToString(); 
          or1.Parameters.Add("SYVVORGDT13", OracleType.NVarChar).Value = dwData["SYVVORGDT13"].ToString(); 
          or1.Parameters.Add("SYVVORGDT14", OracleType.NVarChar).Value = dwData["SYVVORGDT14"].ToString(); 
          or1.Parameters.Add("SYVVORGDT15", OracleType.NVarChar).Value = dwData["SYVVORGDT15"].ToString(); 
          or1.Parameters.Add("SYVVORGDT16", OracleType.NVarChar).Value = dwData["SYVVORGDT16"].ToString(); 
          or1.Parameters.Add("SYVVORGDT17", OracleType.NVarChar).Value = dwData["SYVVORGDT17"].ToString(); 
          or1.Parameters.Add("SYVVORGDT18", OracleType.NVarChar).Value = dwData["SYVVORGDT18"].ToString(); 
          or1.Parameters.Add("SYVVORGDT19", OracleType.NVarChar).Value = dwData["SYVVORGDT19"].ToString(); 
          or1.Parameters.Add("SYVVORGDT20", OracleType.NVarChar).Value = dwData["SYVVORGDT20"].ToString(); 
          or1.Parameters.Add("SYVVORGDT21", OracleType.NVarChar).Value = dwData["SYVVORGDT21"].ToString(); 
          or1.Parameters.Add("SYVVORGDT22", OracleType.NVarChar).Value = dwData["SYVVORGDT22"].ToString(); 
          or1.Parameters.Add("SYVVORGDT23", OracleType.NVarChar).Value = dwData["SYVVORGDT23"].ToString(); 
          or1.Parameters.Add("SYVVORGDT24", OracleType.NVarChar).Value = dwData["SYVVORGDT24"].ToString(); 
          or1.Parameters.Add("SYVVORGDT25", OracleType.NVarChar).Value = dwData["SYVVORGDT25"].ToString(); 
          or1.Parameters.Add("SYVVORGDT26", OracleType.NVarChar).Value = dwData["SYVVORGDT26"].ToString(); 
          or1.Parameters.Add("SYVVORGDT27", OracleType.NVarChar).Value = dwData["SYVVORGDT27"].ToString(); 
          or1.Parameters.Add("SYVVORGDT28", OracleType.NVarChar).Value = dwData["SYVVORGDT28"].ToString(); 
          or1.Parameters.Add("SYVVORGDT29", OracleType.NVarChar).Value = dwData["SYVVORGDT29"].ToString(); 
          or1.Parameters.Add("SYVVORGDT30", OracleType.NVarChar).Value = dwData["SYVVORGDT30"].ToString(); 
          or1.Parameters.Add("SYVVORGDT31", OracleType.NVarChar).Value = dwData["SYVVORGDT31"].ToString(); 
          or1.Parameters.Add("SYVVORGDT32", OracleType.NVarChar).Value = dwData["SYVVORGDT32"].ToString(); 
          or1.Parameters.Add("SYVVORGDT33", OracleType.NVarChar).Value = dwData["SYVVORGDT33"].ToString(); 
          or1.Parameters.Add("SYVVORGDT34", OracleType.NVarChar).Value = dwData["SYVVORGDT34"].ToString(); 
          or1.Parameters.Add("SYVVORGDT35", OracleType.NVarChar).Value = dwData["SYVVORGDT35"].ToString(); 
          or1.Parameters.Add("SYVVORGDT36", OracleType.NVarChar).Value = dwData["SYVVORGDT36"].ToString(); 
          or1.Parameters.Add("SYVVORGDT37", OracleType.NVarChar).Value = dwData["SYVVORGDT37"].ToString(); 
          or1.Parameters.Add("SYVVORGDT38", OracleType.NVarChar).Value = dwData["SYVVORGDT38"].ToString(); 
          or1.Parameters.Add("SYVVORGDT39", OracleType.NVarChar).Value = dwData["SYVVORGDT39"].ToString(); 
          or1.Parameters.Add("SYVVORGDT40", OracleType.NVarChar).Value = dwData["SYVVORGDT40"].ToString(); 
          or1.Parameters.Add("SYVVORGFS1", OracleType.NVarChar).Value = dwData["SYVVORGFS1"].ToString(); 
          or1.Parameters.Add("SYVBEZFS1", OracleType.NVarChar).Value = dwData["SYVBEZFS1"].ToString(); 
          or1.Parameters.Add("SYVVORGFS2", OracleType.NVarChar).Value = dwData["SYVVORGFS2"].ToString(); 
          or1.Parameters.Add("SYVBEZFS2", OracleType.NVarChar).Value = dwData["SYVBEZFS2"].ToString(); 
          or1.Parameters.Add("SYVVORGFS3", OracleType.NVarChar).Value = dwData["SYVVORGFS3"].ToString(); 
          or1.Parameters.Add("SYVBEZFS3", OracleType.NVarChar).Value = dwData["SYVBEZFS3"].ToString(); 
          or1.Parameters.Add("SYVVORGFS4", OracleType.NVarChar).Value = dwData["SYVVORGFS4"].ToString(); 
          or1.Parameters.Add("SYVBEZFS4", OracleType.NVarChar).Value = dwData["SYVBEZFS4"].ToString(); 
          or1.Parameters.Add("SYVVORGFS5", OracleType.NVarChar).Value = dwData["SYVVORGFS5"].ToString(); 
          or1.Parameters.Add("SYVBEZFS5", OracleType.NVarChar).Value = dwData["SYVBEZFS5"].ToString(); 
          or1.Parameters.Add("SYVVORGFS6", OracleType.NVarChar).Value = dwData["SYVVORGFS6"].ToString(); 
          or1.Parameters.Add("SYVBEZFS6", OracleType.NVarChar).Value = dwData["SYVBEZFS6"].ToString(); 
          or1.Parameters.Add("SYVVORGFS7", OracleType.NVarChar).Value = dwData["SYVVORGFS7"].ToString(); 
          or1.Parameters.Add("SYVBEZFS7", OracleType.NVarChar).Value = dwData["SYVBEZFS7"].ToString(); 
          or1.Parameters.Add("SYVVORGFS8", OracleType.NVarChar).Value = dwData["SYVVORGFS8"].ToString(); 
          or1.Parameters.Add("SYVBEZFS8", OracleType.NVarChar).Value = dwData["SYVBEZFS8"].ToString(); 
          or1.Parameters.Add("SYVVORGFS9", OracleType.NVarChar).Value = dwData["SYVVORGFS9"].ToString(); 
          or1.Parameters.Add("SYVBEZFS9", OracleType.NVarChar).Value = dwData["SYVBEZFS9"].ToString(); 
          or1.Parameters.Add("SYVVORGFS10", OracleType.NVarChar).Value = dwData["SYVVORGFS10"].ToString(); 
          or1.Parameters.Add("SYVBEZFS10", OracleType.NVarChar).Value = dwData["SYVBEZFS10"].ToString(); 
          or1.Parameters.Add("SYVVORGFS11", OracleType.NVarChar).Value = dwData["SYVVORGFS11"].ToString(); 
          or1.Parameters.Add("SYVBEZFS11", OracleType.NVarChar).Value = dwData["SYVBEZFS11"].ToString(); 
          or1.Parameters.Add("SYVVORGFS12", OracleType.NVarChar).Value = dwData["SYVVORGFS12"].ToString(); 
          or1.Parameters.Add("SYVBEZFS12", OracleType.NVarChar).Value = dwData["SYVBEZFS12"].ToString(); 
          or1.Parameters.Add("SYVVORGFS13", OracleType.NVarChar).Value = dwData["SYVVORGFS13"].ToString(); 
          or1.Parameters.Add("SYVBEZFS13", OracleType.NVarChar).Value = dwData["SYVBEZFS13"].ToString(); 
          or1.Parameters.Add("SYVVORGFS14", OracleType.NVarChar).Value = dwData["SYVVORGFS14"].ToString(); 
          or1.Parameters.Add("SYVBEZFS14", OracleType.NVarChar).Value = dwData["SYVBEZFS14"].ToString(); 
          or1.Parameters.Add("SYVVORGFS15", OracleType.NVarChar).Value = dwData["SYVVORGFS15"].ToString(); 
          or1.Parameters.Add("SYVBEZFS15", OracleType.NVarChar).Value = dwData["SYVBEZFS15"].ToString(); 
          or1.Parameters.Add("SYVVORGFS16", OracleType.NVarChar).Value = dwData["SYVVORGFS16"].ToString(); 
          or1.Parameters.Add("SYVBEZFS16", OracleType.NVarChar).Value = dwData["SYVBEZFS16"].ToString(); 
          or1.Parameters.Add("SYVVORGFS17", OracleType.NVarChar).Value = dwData["SYVVORGFS17"].ToString(); 
          or1.Parameters.Add("SYVBEZFS17", OracleType.NVarChar).Value = dwData["SYVBEZFS17"].ToString(); 
          or1.Parameters.Add("SYVVORGFS18", OracleType.NVarChar).Value = dwData["SYVVORGFS18"].ToString(); 
          or1.Parameters.Add("SYVBEZFS18", OracleType.NVarChar).Value = dwData["SYVBEZFS18"].ToString(); 
          or1.Parameters.Add("SYVVORGFS19", OracleType.NVarChar).Value = dwData["SYVVORGFS19"].ToString(); 
          or1.Parameters.Add("SYVBEZFS19", OracleType.NVarChar).Value = dwData["SYVBEZFS19"].ToString(); 
          or1.Parameters.Add("SYVVORGFS20", OracleType.NVarChar).Value = dwData["SYVVORGFS20"].ToString(); 
          or1.Parameters.Add("SYVBEZFS20", OracleType.NVarChar).Value = dwData["SYVBEZFS20"].ToString(); 
          or1.Parameters.Add("SYVVORGFS21", OracleType.NVarChar).Value = dwData["SYVVORGFS21"].ToString(); 
          or1.Parameters.Add("SYVBEZFS21", OracleType.NVarChar).Value = dwData["SYVBEZFS21"].ToString(); 
          or1.Parameters.Add("SYVVORGFS22", OracleType.NVarChar).Value = dwData["SYVVORGFS22"].ToString(); 
          or1.Parameters.Add("SYVBEZFS22", OracleType.NVarChar).Value = dwData["SYVBEZFS22"].ToString(); 
          or1.Parameters.Add("SYVVORGFS23", OracleType.NVarChar).Value = dwData["SYVVORGFS23"].ToString(); 
          or1.Parameters.Add("SYVBEZFS23", OracleType.NVarChar).Value = dwData["SYVBEZFS23"].ToString(); 
          or1.Parameters.Add("SYVVORGFS24", OracleType.NVarChar).Value = dwData["SYVVORGFS24"].ToString(); 
          or1.Parameters.Add("SYVBEZFS24", OracleType.NVarChar).Value = dwData["SYVBEZFS24"].ToString(); 
          or1.Parameters.Add("SYVVORGFS25", OracleType.NVarChar).Value = dwData["SYVVORGFS25"].ToString(); 
          or1.Parameters.Add("SYVBEZFS25", OracleType.NVarChar).Value = dwData["SYVBEZFS25"].ToString(); 
          or1.Parameters.Add("SYVVORGFS26", OracleType.NVarChar).Value = dwData["SYVVORGFS26"].ToString(); 
          or1.Parameters.Add("SYVBEZFS26", OracleType.NVarChar).Value = dwData["SYVBEZFS26"].ToString(); 
          or1.Parameters.Add("SYVVORGFS27", OracleType.NVarChar).Value = dwData["SYVVORGFS27"].ToString(); 
          or1.Parameters.Add("SYVBEZFS27", OracleType.NVarChar).Value = dwData["SYVBEZFS27"].ToString(); 
          or1.Parameters.Add("SYVVORGFS28", OracleType.NVarChar).Value = dwData["SYVVORGFS28"].ToString(); 
          or1.Parameters.Add("SYVBEZFS28", OracleType.NVarChar).Value = dwData["SYVBEZFS28"].ToString(); 
          or1.Parameters.Add("SYVVORGFS29", OracleType.NVarChar).Value = dwData["SYVVORGFS29"].ToString(); 
          or1.Parameters.Add("SYVBEZFS29", OracleType.NVarChar).Value = dwData["SYVBEZFS29"].ToString(); 
          or1.Parameters.Add("SYVVORGFS30", OracleType.NVarChar).Value = dwData["SYVVORGFS30"].ToString(); 
          or1.Parameters.Add("SYVBEZFS30", OracleType.NVarChar).Value = dwData["SYVBEZFS30"].ToString(); 
          or1.Parameters.Add("SYVVORGFS31", OracleType.NVarChar).Value = dwData["SYVVORGFS31"].ToString(); 
          or1.Parameters.Add("SYVBEZFS31", OracleType.NVarChar).Value = dwData["SYVBEZFS31"].ToString(); 
          or1.Parameters.Add("SYVVORGFS32", OracleType.NVarChar).Value = dwData["SYVVORGFS32"].ToString(); 
          or1.Parameters.Add("SYVBEZFS32", OracleType.NVarChar).Value = dwData["SYVBEZFS32"].ToString(); 
          or1.Parameters.Add("SYVVORGFS33", OracleType.NVarChar).Value = dwData["SYVVORGFS33"].ToString(); 
          or1.Parameters.Add("SYVBEZFS33", OracleType.NVarChar).Value = dwData["SYVBEZFS33"].ToString(); 
          or1.Parameters.Add("SYVVORGFS34", OracleType.NVarChar).Value = dwData["SYVVORGFS34"].ToString(); 
          or1.Parameters.Add("SYVBEZFS34", OracleType.NVarChar).Value = dwData["SYVBEZFS34"].ToString(); 
          or1.Parameters.Add("SYVVORGFS35", OracleType.NVarChar).Value = dwData["SYVVORGFS35"].ToString(); 
          or1.Parameters.Add("SYVBEZFS35", OracleType.NVarChar).Value = dwData["SYVBEZFS35"].ToString(); 
          or1.Parameters.Add("SYVVORGFS36", OracleType.NVarChar).Value = dwData["SYVVORGFS36"].ToString(); 
          or1.Parameters.Add("SYVBEZFS36", OracleType.NVarChar).Value = dwData["SYVBEZFS36"].ToString(); 
          or1.Parameters.Add("SYVVORGFS37", OracleType.NVarChar).Value = dwData["SYVVORGFS37"].ToString(); 
          or1.Parameters.Add("SYVBEZFS37", OracleType.NVarChar).Value = dwData["SYVBEZFS37"].ToString(); 
          or1.Parameters.Add("SYVVORGFS38", OracleType.NVarChar).Value = dwData["SYVVORGFS38"].ToString(); 
          or1.Parameters.Add("SYVBEZFS38", OracleType.NVarChar).Value = dwData["SYVBEZFS38"].ToString(); 
          or1.Parameters.Add("SYVVORGFS39", OracleType.NVarChar).Value = dwData["SYVVORGFS39"].ToString(); 
          or1.Parameters.Add("SYVBEZFS39", OracleType.NVarChar).Value = dwData["SYVBEZFS39"].ToString(); 
          or1.Parameters.Add("SYVVORGFS40", OracleType.NVarChar).Value = dwData["SYVVORGFS40"].ToString(); 
          or1.Parameters.Add("SYVBEZFS40", OracleType.NVarChar).Value = dwData["SYVBEZFS40"].ToString(); 
          or1.Parameters.Add("SYVBEMERK", OracleType.NVarChar).Value = dwData["SYVBEMERK"].ToString(); 
          or1.Parameters.Add("SYVFILLER", OracleType.NVarChar).Value = dwData["SYVFILLER"].ToString(); 
          or1.Parameters.Add("SYVAEND", OracleType.NVarChar).Value = dwData["SYVAEND"].ToString(); 
          or1.Parameters.Add("SYVAENB", OracleType.NVarChar).Value = dwData["SYVAENB"].ToString(); 
          or1.Parameters.Add("SYVNEUD", OracleType.NVarChar).Value = dwData["SYVNEUD"].ToString(); 
          or1.Parameters.Add("SYVNEUB", OracleType.NVarChar).Value = dwData["SYVNEUB"].ToString(); 
          or1.Parameters.Add("SYVAENZL", OracleType.NVarChar).Value = dwData["SYVAENZL"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
